""" DigitalICS: mobile data collection tool to complete surveys with integrated multimedia

    Copyright (C) 2009. Yael Schwartzman  

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>
    
    Contact information: Yael Schwartzman -  yaelsf@gmail.com
    """
from api.form import Form
from api.constants import Constants


def enform5(community,municipio,localidad,producer,num_parcels = None):
    c = Constants()
    form = Form()        
    form.set_community_id(community)
    form.set_producer_id(producer)
    form.set_municipio_id(municipio)
    form.set_localidad_id(localidad)
    
    form.set_num_parcels(num_parcels)
    form.set_id("Section5")
    form.set_module("enform5")
    form.set_name("MultiMedia")
    
    form.add_mult_data(["social_premium_use","breaches",
        "signature", "producer_pic","feedback","feedback_producer","ts1","ts2"])

    form.add_prompt(label = "1.Please record what was the social premium used for",
                    audio = "9.8use_social",
                    media_file = "social_premium_use.amr",
                    id = "1.use social",
                    data = "social_premium_use",
                    input_type = c.AUDIO)
    
    form.add_prompt(label = "2.Please record general comments and breaches of standard found",
                    audio ="9.9breaches",
                    media_file = "general_comments.amr",
                    data = "breaches",
                    id = "2.breaches",
                    input_type = c.AUDIO) 

    
    form.add_prompt(label = "3.Please take a picture of the producer",
                    audio ="9.10producer_pics",
                    media_file = "producer_pic.jpg",
                    data = "producer_pic",
                    id = "3.producer",
                    input_type = c.PHOTO)
    
    
    form.add_prompt(label = "4.Please take a picture of the producer's signature",
                    audio ="9.11signature",
                    media_file = "signature.jpg",
                    data = "signature",
                    id = "4.signature",
                    input_type = c.PHOTO)
    

    form.add_prompt(label = "5. Does the producer have a comment or a suggestion about this digital intenral control system?",
                    audio ="10.feedback_pen",
                    data = "feedback_producer",
                    id = "5.sug_producer",
                    input_type = c.FEEDBACK)  

    form.add_prompt(label = "6. Do you have a comment or suggestion about this digital internal control system?",
                    audio ="10.feedback_en",
                    data = "feedback",
                    id = "6.suggestions",
                    input_type = c.FEEDBACK)    
    
    return form
